import pymongo

class MyMonge:
    def __init__(self,z_Cate,set,**mongodb_kwargs):
        self.client = pymongo.MongoClient(**mongodb_kwargs)
        self.db = self.client[z_Cate]
        self.col = self.db[set]

    # 插入数据
    def insert(self,key):
        return self.db.insert(key)

    # 查询一条数据
    def find(self,key):
        return self.col.find_one(key)



